using System;

namespace Td.Additional.Log
{
    /// <summary>
    /// Log entry event arguments
    /// </summary>
    public class LogEntry : EventArgs
    {
        #region Properties

        /// <summary>
        /// Gets or sets the time stamp.
        /// </summary>
        /// <value>The time stamp.</value>
        public DateTime TimeStamp { get; set; }

        /// <summary>
        /// Gets or sets the level.
        /// </summary>
        /// <value>The level.</value>
        public LogLevel Level { get; set; }

        /// <summary>
        /// Gets or sets the source.
        /// </summary>
        /// <value>The source.</value>
        public String Source { get; set; }

        /// <summary>
        /// Gets or sets the message.
        /// </summary>
        /// <value>The message.</value>
        public String Message { get; set; }

        #endregion

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="LogEntry"/> class.
        /// </summary>
        public LogEntry()
        {
            TimeStamp = DateTime.Now;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="LogEntry"/> class.
        /// </summary>
        /// <param name="level">The level.</param>
        /// <param name="source">The source.</param>
        /// <param name="message">The message.</param>
        public LogEntry(LogLevel level, String source, String message)
            : this()
        {
            Level = level;
            Source = source;
            Message = message;
        }

        #endregion
    }
}